package com.njust.bean;

public class Book {

    private String bookName;
    private String author;

    /**
     * 生命周期的初始化方法
     */
    public void myInit(){
        System.out.println("这是Book对象的myInit初始化方法...");
    }

    /**
     * 生命周期的销毁方法
     */
    public void myDestroy(){
        System.out.println("这是Book对象的myDestroy销毁方法...");
    }
    public Book() {
        super();
        // TODO Auto-generated constructor stub
        System.out.println("book被创建");
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", author='" + author + '\'' +
                '}';
    }
}
